<?php
$config= [
    'app'=>[
        'name'=>'test_app',//应用唯一辨识名称,分布式下回有用
        'debug'=>true,       //debug模式
        'debug_secret'=>'123456',//debug调试密钥
        'init'=>\app\AppInit::class, //初始化类
    ],
    'swoole_http'=>[                //swoole_http服务器
        'ip'=>'0.0.0.0',  //默认
        'port'=>9501,   //端口
        'document_root'=>ROOT_PATH,  //静态文件根目录
        'enable_static_handler'=>false,     //开启静态文件
        'worker_num'=>1,        //woker 进程数
        'task_worker_num'=>0,   //异步任务进程数
        'task_max_request'=>0,   //woker进程最大访问次数
        'coroutine'=>true              //使用协程进行异步编程
    ],
    'interceptors'=>[

    ],
    'interceptors_except'=>['/log'],//拦截器排除路径前缀
    'mapping'=>[
        '/log'=>\rap\log\controller\LogController::class, //不想使用可以移除
        "/home"=>\app\api\controller\HomeController::class,
        '/cdd'=>'/app/subordinate',
        '/common'=>\app\common\controller\IndexController::class
    ],
    'view'=>[ //模板引擎
        'type'=>'twig',
        'template_base'=>'template',
        'postfix'=>'html',
    ],

    'config'=>[//数据库中配置项
        "table"=>"config",
        "module_field"=>"module",
        "content_field"=>"content",
    ],
//    'rpc_service'=>[        //RPC服务方配置
//        'token'=>'123',
//    ],
//    'rpc'=>[  //RPC客户端配置
//              'cloud'=>[
//                        'register'=>\test\rpc\RPcTestRegister::class,
//                        'host' => 'cloud',
//                        'port'=>80,
//                        'token' => '123',
//                        'timeout'=>5,
//                        'fuse_time'=>30,//熔断器熔断后多久进入半开状态
//                        'fuse_fail_count'=>20,//连续失败多少次开启熔断
//                        'pool'=>['min'=>1,
//                                 'max'=>10,
//                                 'check'=>30,
//                                 'idle'=>30
//                        ],
//              ]
//    ],

    'log'=>[ //log 类型
        'type'=>'file'
    ],
    'cmds'=>[//自定义命令行

    ],
    'media_platform'=>[
        'weixin'=>[
            'wx_component_appid'=>"wx37e2a9f79f381615",
            'auth_appid'=>'wxb79dd111111fc459',
            'wx_cloud'=>'https://wx.cloud.magcloud.net',
        ],
        'weibo'=>[
            'app_key'=>"782205457",
            'app_secret'=>"6dc6f11c7a339ae2fd69f3de6efdd727",
            'wb_cloud'=>"test.weibo.magcloud.net",
            'authorizeURL'=>"https://api.weibo.com/oauth2/authorize",
            'wb_call_back'=>"http://test.weibo.magcloud.net/weibo/callback.php"
        ],
    ],

    'app_info' =>[
        'secret' =>'MsjQHHTstEMfHwytJKWb2X4KWAmKMjmw',
        'url' => 'http://app.bihuapp.com/mag/cloud/cloud/getUserInfo',
        'wzUrl' => 'http://v.juhe.cn/wz/query',
        'wz_key' => 'baab909d83975bb5e5dee41076b3f164',
        'goldUrl' => "http://app.bihuapp.com/mag/user/v1/GradeScore/addUserGold?",
        'app_secret' => "MsjQHHTstEMfHwytJKWb2X4KWAmKMjmw"
    ],
    'backUrl' => [
        'base_url' => 'http://app.bihuapp.com',
        'order_url' => '/core/pay/pay/unifiedOrder?'
    ],

    'oil_url' => [
        "url" => 'http://apis.juhe.cn/cnoil/oil_city?type=json&key=e1d0a301e975b3a3f39c0273ea7dcda7'
    ],
    'qiniu' => [
        'bucket' => 'chexun-imgs',
        'AccessKey1' => 'MhPSrJPHR31WjZ7uJ0Dgn1iQisrLwoR46G8z_4s5',
        'SecretKey1' => 'CDGB9523Xa5iPoSgwo6bUW-bBdLqi_o2vR04OKvH',
        'AccessKey2' => 'DF62pjSLQ5cfDWTmqWW8pT71QadAKt6v1cICAAnY',
        'SecretKey2' => 'Yxey2gVJH3TVVWFbcZlEgoifi91T9tABqEaa8beB',
        'domain' => 'http://download.bihuapp.com'
    ],

    "payUrl" => [
        'url' => 'http://app.bihuapp.com/core/pay/pay/unifiedOrder?',
        'sum_url' => 'http://app.bihuapp.com/core/pay/pay/getAccountBalance?'
    ],

    "gold_url" => [
        'url' =>  "http://app.bihuapp.com/mag/user/v1/GradeScore/userGoldGet?"
    ],

    "handCar"=>[
        'provinceUrl' => 'http://v.juhe.cn/usedcar/province?',
        'cityUrl' => 'http://v.juhe.cn/usedcar/city?',
        'bandUrl' => 'http://v.juhe.cn/usedcar/brand?',
        'seriesUrl' => 'http://v.juhe.cn/usedcar/series?',
        'carUrl' => 'http://v.juhe.cn/usedcar/car?',
        'yearUrl' => 'http://v.juhe.cn/usedcar/year?',
        'url' => 'http://v.juhe.cn/usedcar/assess?',
        'key' => 'cda4d55cdfa5a16e4260b8a2343a5236'
    ],

    'gasStation' => [
        'dis_url' => 'http://apis.juhe.cn/oil/local?',
        'key' => '13951001d717681f2a8cd4e508b5f2af',
        'city_url' => 'http://apis.juhe.cn/oil/region?'
    ],

];
$db=include "db.php";
$config=array_merge($config,$db);
return $config;